home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1995 #5 & #6 / Amiga Plus CD - 1995 - No. 5 and 6.iso / tex / macros / distribs / nfss / array.sty < prev    next >
Text File  |  1992-11-29  |  13KB  |  357 lines

  1. %% 
  2. %% This is file `array.sty', generated 
  3. %% on <1992/9/24> with the docstrip utility (2.0r).
  4. %% 
  5. %% The original source files were:
  6. %% 
  7. %% ../array/array.doc  (with options: `style,ncols')
  8. %% 
  9. %% Copyright (C) 1989-1992 by Frank Mittelbach, Rainer Schoepf. 
  10. %% All rights reserved. 
  11. %% 
  12. %% This file is part of the NFSS (New Font Selection Scheme) package. 
  13. %% 
  14. %% IMPORTANT NOTICE: 
  15. %% 
  16. %% You are not allowed to change this file. You may however copy 
  17. %% this file to a file with a different name and then change the copy 
  18. %% if you obey the restrictions on file changes described in 
  19. %% readme.mz. 
  20. %% 
  21. %% You are allowed to distribute this file under the condition that 
  22. %% it is distributed together with all files mentioned in readme.mz3. 
  23. %% If you receive only some of these files from someone, complain! 
  24. %% 
  25. %% You are NOT ALLOWED to distribute this file alone. You are NOT 
  26. %% ALLOWED to take money for the distribution or use of either this 
  27. %% file or a changed version, except for a nominal charge for copying 
  28. %% etc. 
  29. %% 
  30. %% For error reports in case of UNCHANGED versions see readme files. 
  31. %% 
  32. %% Please do not request updates from us directly. Distribution is 
  33. %% done through Mail-Servers and TeX organizations. 
  34. %% 
  35.  
  36. \def\fileversion{v2.1b}
  37. \def\filedate{92/07/06}
  38. \def\docdate {92/09/12}
  39.  
  40. %% \CheckSum{1070}
  41. %% \CharacterTable
  42. %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
  43. %%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
  44. %%   Digits        \0\1\2\3\4\5\6\7\8\9
  45. %%   Exclamation   \!     Double quote  \"     Hash (number) \#
  46. %%   Dollar        \$     Percent       \%     Ampersand     \&
  47. %%   Acute accent  \'     Left paren    \(     Right paren   \)
  48. %%   Asterisk      \*     Plus          \+     Comma         \,
  49. %%   Minus         \-     Point         \.     Solidus       \/
  50. %%   Colon         \:     Semicolon     \;     Less than     \<
  51. %%   Equals        \=     Greater than  \>     Question mark \?
  52. %%   Commercial at \@     Left bracket  \[     Backslash     \\
  53. %%   Right bracket \]     Circumflex    \^     Underscore    \_
  54. %%   Grave accent  \`     Left brace    \{     Vertical bar  \|
  55. %%   Right brace   \}     Tilde         \~}
  56. %%
  57. %% Style-option `array' to use with LaTeX v2.09
  58. %% Copyright (C) 1989-1992 Frank Mittelbach, all rights reserved.
  59. \@ifundefined{d@llarbegin}{}{\endinput}
  60. \typeout{Style-Option: `array' \fileversion
  61.          \space\space <\filedate> (F.M.)}
  62. \typeout{English documentation dated \space <\docdate> (F.M.)}
  63. \def\@addtopreamble#1{\xdef\@preamble{\@preamble #1}}
  64. \def\@testpach{\@chclass
  65.  \ifnum \@lastchclass=6 \@ne \@chnum \@ne \else
  66.   \ifnum \@lastchclass=7 5 \else
  67.    \ifnum \@lastchclass=8 \tw@ \else
  68.     \ifnum \@lastchclass=9 \thr@@
  69.    \else \z@
  70.    \ifnum \@lastchclass = 10 \else
  71.    \edef\@nextchar{\expandafter\string\@nextchar}%
  72.    \@chnum
  73.    \if \@nextchar c\z@ \else
  74.     \if \@nextchar l\@ne \else
  75.      \if \@nextchar r\tw@ \else
  76.    \z@ \@chclass
  77.    \if\@nextchar |\@ne \else
  78.     \if \@nextchar !6 \else
  79.      \if \@nextchar @7 \else
  80.       \if \@nextchar <8 \else
  81.        \if \@nextchar >9 \else
  82.   10
  83.   \@chnum
  84.   \if \@nextchar m\thr@@\else
  85.    \if \@nextchar p4 \else
  86.     \if \@nextchar b5 \else
  87.    \z@ \@chclass \z@ \@preamerr \z@ \fi \fi \fi \fi
  88.    \fi \fi  \fi  \fi  \fi  \fi  \fi \fi \fi \fi \fi \fi}
  89. \def\@xexpast#1*#2#3#4\@@{%
  90.    \@tempcnta #2
  91.    \toks@={#1}\@temptokena={#3}%
  92.    \let\the@toksz\relax \let\the@toks\relax
  93.    \def\@tempa{\the@toksz}%
  94.    \ifnum\@tempcnta >0 \@whilenum\@tempcnta >0\do
  95.      {\edef\@tempa{\@tempa\the@toks}\advance \@tempcnta \m@ne}%
  96.        \let \@tempb \@xexpast \else
  97.        \let \@tempb \@xexnoop \fi
  98.    \def\the@toksz{\the\toks@}\def\the@toks{\the\@temptokena}%
  99.    \edef\@tempa{\@tempa}%
  100.    \expandafter \@tempb \@tempa #4\@@}
  101. \def\prepnext@tok{\advance \count@ \@ne
  102.    \toks\count@{}}
  103. \def\save@decl{\toks\count@ \expandafter{\@nextchar}}
  104. \def\insert@column{%
  105.    \the@toks \the \@tempcnta
  106.    \ignorespaces \@sharp \unskip
  107.    \the@toks \the \count@ \relax}
  108. \newdimen\col@sep
  109. \def\@acol{\@addtopreamble{\hskip\col@sep}}
  110. \def\@mkpream#1{\gdef\@preamble{}\@lastchclass 4 \@firstamptrue
  111.    \let\@sharp\relax \let\@startpbox\relax \let\@endpbox\relax
  112.    \@xexpast #1*0x\@@
  113.    \count@\m@ne
  114.    \let\the@toks\relax
  115.    \prepnext@tok
  116.    \expandafter \@tfor \expandafter \@nextchar
  117.     \expandafter :\expandafter =\@tempa \do
  118.    {\@testpach
  119.    \ifcase \@chclass \@classz \or \@classi \or \@classii
  120.      \or \save@decl \or \or \@classv \or \@classvi
  121.      \or \@classvii \or \@classviii  \or \@classix
  122.      \or \@classx \fi
  123.    \@lastchclass\@chclass}%
  124.    \ifcase\@lastchclass
  125.    \@acol \or
  126.    \or
  127.    \@acol \or
  128.    \@preamerr \thr@@ \or
  129.    \@preamerr \tw@ \@addtopreamble\@sharp \or
  130.    \or
  131.    \else  \@preamerr \@ne \fi
  132.    \def\the@toks{\the\toks}}
  133. \def\@classx{%
  134.   \ifcase \@lastchclass
  135.   \@acolampacol \or
  136.   \@addamp \@acol \or
  137.   \@acolampacol \or
  138.   \or
  139.   \@acol \@firstampfalse \or
  140.   \@addamp
  141.   \fi}
  142. \def\@classz{\@classx
  143.    \@tempcnta \count@
  144.    \prepnext@tok
  145.    \@addtopreamble{\ifcase \@chnum
  146.       \hfil
  147.       \d@llarbegin
  148.       \insert@column
  149.       \d@llarend \hfil \or
  150.       \d@llarbegin \insert@column \d@llarend \hfil \or
  151.       \hfil\kern\z@ \d@llarbegin \insert@column \d@llarend \or
  152.    $\vcenter
  153.    \@startpbox{\@nextchar}\insert@column \@endpbox $\or
  154.    \vtop \@startpbox{\@nextchar}\insert@column \@endpbox \or
  155.    \vbox \@startpbox{\@nextchar}\insert@column \@endpbox
  156.   \fi}\prepnext@tok}
  157. \def\@classix{\ifnum \@lastchclass = \thr@@
  158.        \@preamerr \thr@@ \fi
  159.        \@classx}
  160. \def\@classviii{\ifnum \@lastchclass >\z@
  161.       \@preamerr 4\@chclass 6 \@classvi \fi}
  162. \def\@arrayrule{\@addtopreamble \vline}
  163. \def\@classvii{\ifnum \@lastchclass = \thr@@
  164.    \@preamerr \thr@@ \fi}
  165. \def\@classvi{\ifcase \@lastchclass
  166.       \@acol \or
  167.       \@addtopreamble{\hskip \doublerulesep}\or
  168.       \@acol \or
  169.       \@classvii
  170.       \fi}
  171. \def\@classii{\advance \count@ \m@ne
  172.    \save@decl\prepnext@tok}
  173. \def\@classv{\save@decl
  174.    \@addtopreamble{\d@llarbegin\the@toks\the\count@\relax\d@llarend}%
  175.    \prepnext@tok}
  176. \def\@classi{\@classvi
  177.    \ifcase \@chnum \@arrayrule \or
  178.       \@classv \fi}
  179. \def\@startpbox#1{\bgroup
  180.   \hsize #1 \@arrayparboxrestore
  181.    \vrule \@height \ht\@arstrutbox \@width \z@}
  182. \def\@endpbox{\vrule \@width \z@ \@depth \dp \@arstrutbox \egroup}
  183. \def\@array[#1]#2{%
  184.   \@tempdima \ht \strutbox
  185.   \advance \@tempdima by\extrarowheight
  186.   \setbox \@arstrutbox \hbox{\vrule
  187.              \@height \arraystretch \@tempdima
  188.              \@depth \arraystretch \dp \strutbox
  189.              \@width \z@}%
  190.   \begingroup
  191.   \@mkpream{#2}%
  192.   \xdef\@preamble{\ialign \@halignto
  193.                   \bgroup \@arstrut \@preamble
  194.                           \tabskip \z@ \cr}%
  195.   \endgroup
  196.   \@arrayleft
  197.   \if #1t\vtop \else \if#1b\vbox \else \vcenter \fi \fi
  198.   \bgroup
  199.   \let \@sharp ##\let \protect \relax
  200.   \lineskip \z@
  201.   \baselineskip \z@
  202.   \m@th
  203.   \let\\ \@arraycr  \let\par\@empty \@preamble}
  204. \newdimen \extrarowheight
  205. \extrarowheight=0pt
  206. \def\@arstrut{\unhcopy\@arstrutbox}
  207. \def\@arraycr{{\ifnum 0=`}\fi
  208.   \@ifstar \@xarraycr \@xarraycr}
  209. \def\@xarraycr{\@ifnextchar [%
  210.   \@argarraycr {\ifnum 0=`{\fi}\cr}}
  211. \def\@argarraycr[#1]{\ifnum0=`{\fi}\ifdim #1>\z@
  212.   \@xargarraycr{#1}\else \@yargarraycr{#1}\fi}
  213. \def\@xargarraycr#1{\unskip
  214.   \@tempdima #1\advance\@tempdima \dp\@arstrutbox
  215.   \vrule \@depth\@tempdima \@width\z@ \cr}
  216. \def\@yargarraycr#1{\cr\noalign{\vskip #1}}
  217. \def\multicolumn#1#2#3{%
  218.    \multispan{#1}\begingroup
  219.    \def\@addamp{\if@firstamp \@firstampfalse \else
  220.                 \@preamerr 5\fi}%
  221.    \@mkpream{#2}\@addtopreamble\@empty
  222.    \endgroup
  223.    \def\@sharp{#3}%
  224.    \@arstrut \@preamble \ignorespaces}
  225. \let\d@llarbegin\begingroup
  226. \let\d@llarend\endgroup
  227. \def\array{\col@sep\arraycolsep
  228.   \def\d@llarbegin{$}\let\d@llarend\d@llarbegin\gdef\@halignto{}%
  229.   \@tabarray}
  230. \def\@tabarray{\@ifnextchar[{\@array}{\@array[c]}}
  231. \def\tabular{\gdef\@halignto{}\@tabular}
  232. \expandafter\def\csname tabular*\endcsname#1{%
  233.       \gdef\@halignto{to#1}\@tabular}
  234. \def\@tabular{%
  235.   \leavevmode
  236.   \hbox \bgroup $\col@sep\tabcolsep \let\d@llarbegin\begingroup
  237.                                     \let\d@llarend\endgroup
  238.   \@tabarray}
  239. \def\endarray{\crcr \egroup \egroup \gdef\@preamble{}}
  240. \def\endtabular{\endarray $\egroup}
  241. \expandafter\let\csname endtabular*\endcsname=\endtabular
  242. \let\@ampacol=\relax        \let\@expast=\relax
  243. \let\@arrayclassiv=\relax   \let\@arrayclassz=\relax
  244. \let\@tabclassiv=\relax     \let\@tabclassz=\relax
  245. \let\@arrayacol=\relax      \let\@tabacol=\relax
  246. \let\@tabularcr=\relax      \let\@@endpbox=\relax
  247. \let\@argtabularcr=\relax   \let\@xtabularcr=\relax
  248. \def\@preamerr#1{\def\@tempd{{..} at wrong position: }%
  249.    \@latexerr{%
  250.    \ifcase #1 Illegal pream-token (\@nextchar): `c' used\or %0
  251.     Missing arg: token ignored\or                           %1
  252.     Empty preamble: `l' used\or                             %2
  253.     >\@tempd token ignored\or                               %3
  254.     <\@tempd changed to !{..}\or                            %4
  255.     Only one column-spec. allowed.\fi}\@ehc}                %5
  256. \def\@tempa#1:=#2\do#3{\def\@fortmp{#2}\ifx\@fortmp\@empty
  257.       \else\@tforloop#2\@nil\@nil\@@#1{#3}\fi}
  258. \ifx\@tempa\@tfor
  259. \else
  260.   \errhelp{The bug fix for \@tfor was removed from
  261.            array.sty because it was^^J%
  262.            corrected in latex.tex <dec91>.^^J^^J%
  263.            Please update to a newer LaTeX release.}
  264.   \errmessage{Obsolete LaTeX release (older than Dec.91)}
  265.   \let\@tfor\@tempa
  266. \fi
  267. \let\@tempa\@empty
  268. \def\newcolumn{%
  269.   \typeout{*** Obsolete command \string\newcolumn!
  270.                Please use \noexpand\newcolumntype ***}%
  271.   \newcolumntype
  272. }
  273. \def\newcolumntype#1{%
  274.   \edef\NC@char{\string#1}%
  275.   \@ifundefined{NC@find@\NC@char}%
  276.     {\@tfor\next:=<>clrmbp@!|\do{\if\next\NC@char
  277.                     \@warning{Redefining primitive column \NC@char}\fi}%
  278.      \NC@list\expandafter{\the\NC@list\NC@do#1}}%
  279.     {\@warning{Column \NC@char\space is already defined}}%
  280.   \@namedef{NC@find@\NC@char}##1#1{\NC@{##1}}%
  281.   \@ifnextchar[{\newcol@{\NC@char}}{\newcol@{\NC@char}[0]}}
  282. \def\newcol@#1[#2]#3{\expandafter\@reargdef
  283.      \csname NC@rewrite@#1\endcsname[#2]{\NC@find#3}}
  284. \def\NC@#1{%
  285.   \@temptokena\expandafter{\the\@temptokena#1}\futurelet\next\NC@ifend}
  286. \def\NC@ifend{%
  287.   \ifx\next\relax
  288.     \else\@tempswatrue\expandafter\NC@rewrite\fi}
  289. \def\NC@do#1{%
  290.   \expandafter\let\expandafter\NC@rewrite
  291.     \csname NC@rewrite@\string#1\endcsname
  292.   \expandafter\let\expandafter\NC@find
  293.     \csname NC@find@\string#1\endcsname
  294.   \expandafter\@temptokena\expandafter{\expandafter}%
  295.         \expandafter\NC@find\the\@temptokena#1\relax}
  296. \def\showcols{{\def\NC@do##1{\let\NC@do\NC@show}\the\NC@list}}
  297. \def\NC@show#1{%
  298.   \typeout{Column #1\expandafter\expandafter\expandafter\NC@strip
  299.   \expandafter\meaning\csname NC@rewrite@#1\endcsname\@@}}
  300. \def\NC@strip#1:#2->#3 #4\@@{#2 -> #4}
  301. \newtoks\NC@list
  302. \newcolumntype{*}[2]{}
  303. \long\@namedef{NC@rewrite@*}#1#2{%
  304.   \count@#1
  305.   \loop
  306.   \ifnum\count@>\z@
  307.   \advance\count@\m@ne
  308.   \@temptokena\expandafter{\the\@temptokena#2}%
  309.   \repeat
  310.   \NC@find}
  311. \let\@xexpast\relax
  312. \let\@xexnoop\relax
  313. \def\save@decl{\toks \count@ = \expandafter\expandafter\expandafter
  314.                   {\expandafter\@nextchar\the\toks\count@}}
  315. \def\@mkpream#1{\gdef\@preamble{}\@lastchclass 4 \@firstamptrue
  316.    \let\@sharp\relax \let\@startpbox\relax \let\@endpbox\relax
  317.    \@temptokena{#1}\@tempswatrue
  318.    \@whilesw\if@tempswa\fi{\@tempswafalse\the\NC@list}%
  319.    \count@\m@ne
  320.    \let\the@toks\relax
  321.    \prepnext@tok
  322.    \expandafter \@tfor \expandafter \@nextchar
  323.     \expandafter :\expandafter =\the\@temptokena \do
  324.    {\@testpach
  325.    \ifcase \@chclass \@classz \or \@classi \or \@classii
  326.      \or \save@decl \or \or \@classv \or \@classvi
  327.      \or \@classvii \or \@classviii
  328.      \or \@classx
  329.      \or \@classx \fi
  330.    \@lastchclass\@chclass}%
  331.    \ifcase\@lastchclass
  332.    \@acol \or
  333.    \or
  334.    \@acol \or
  335.    \@preamerr \thr@@ \or
  336.    \@preamerr \tw@ \@addtopreamble\@sharp \or
  337.    \or
  338.    \else  \@preamerr \@ne \fi
  339.    \def\the@toks{\the\toks}}
  340. \let\@classix\relax
  341. \def\@classviii{\ifnum \@lastchclass >\z@\ifnum\@lastchclass=\tw@\else
  342.       \@preamerr 4\@chclass 6 \@classvi \fi\fi}
  343. \def\@classv{\save@decl
  344.    \expandafter\NC@ecs\@nextchar\extracolsep{}\extracolsep\@@@
  345.    \@addtopreamble{\d@llarbegin\the@toks\the\count@\relax\d@llarend}%
  346.    \prepnext@tok}
  347. \def\NC@ecs#1\extracolsep#2#3\extracolsep#4\@@@{\def\@tempa{#2}%
  348.   \ifx\@tempa\@empty\else\toks\count@={#1\tabskip#2\relax#3}\fi}
  349. \def\@tabarray{\@ifnextchar[{\@@array}{\@@array[c]}}
  350. \let\@@array\@array
  351. \def\endarray{\crcr \egroup \egroup \@arrayright \gdef\@preamble{}}
  352. \let\@arrayleft\@empty
  353. \let\@arrayright\@empty
  354. \endinput
  355. %% 
  356. %% End of file `array.sty'.
  357.